<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        onload=()=>{
            change();
        };

       let change=setTimeout(()=>{
                let firstLi=document.getElementById("firstLi");
                let secondLi=document.getElementsByClassName("secondLi")[0];
                secondLi.innerHTML="";
                firstLi.style.background="red";
                firstLi.innerHTML="请通过ID找到我，并给我红色背景";
                secondLi.innerHTML="请通过className找到我，并改变内容";
            },3000)
    </script>
</head>
<body>
    <ul>
        <li id="firstLi"></li>
        <li class="secondLi">你好，课工场</li>
    </ul>
</body>
</html>